package com.zeen.wima.view;

import android.app.Activity;
import android.app.ProgressDialog;
import android.os.Bundle;
import android.widget.TextView;

import com.zeen.wima.R;
import com.zeen.wima.common.Ad;
import com.zeen.wima.common.Wima;

public class AdView extends Activity {

	ProgressDialog dialog;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ad);
	}

	@Override
	protected void onStart() {
		super.onStart();
		Ad ad = Wima.getInstance().getLastAd();
		if (ad != null) {
			TextView title = (TextView) findViewById(R.id.title);
			title.setText(ad.getTitle());

			TextView desc = (TextView) findViewById(R.id.description);
			desc.setText(ad.getDescription());
		} else {
			finish();
		}
	}

}
